package com.okbihuo.perm.component.sms.domain;

import com.okbihuo.perm.core.mp.base.MyLogicModel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Sms extends MyLogicModel {

    public static Sms create(String target,String captcha,String ip,String tplId,String tplValue,String type,Long expiresAt){
        Sms sms = new Sms();
        sms.setTarget(target);
        sms.setCaptcha(captcha);
        sms.setIp(ip);
        sms.setTplId(tplId);
        sms.setTplValue(tplValue);
        sms.setType(type);
        sms.setAvaliable(1);
        sms.setExpiresAt(expiresAt);
        return sms;
    }

    private String target;
    private String captcha;
    private String response;
    private Integer errorCode;
    private String ip;
    private String token;
    private String sid;
    private String tplId;
    private String tplValue;
    private Integer avaliable;
    private String type;
    private Long expiresAt;
}
